#!/bin/bash
date1=`date -d yesterday +"%Y-%m-%d"`
dir=/vagrant/webapp/runtime/logs
bakdir=/opt/foxitcloud/nfs/runtime/logs

cd $dir

if [ ! -d $bakdir ];then
mkdir -p $bakdir
fi

tar -czvf $bakdir/$date1-app.log.tar.gz $date1-app.log*